<template>
  <div>
    <el-form :model="form" label-width="auto" style="max-width: 600px">
      <el-form-item>
        <!-- <div style="padding: 10px; border: 1px solid #ccc; border-radius: 8px">
          <el-tag v-for="tag in multipleSelection" :key="tag.name" closable :type="tag.type">
            {{ tag.username }}
          </el-tag>
        </div> -->
        {{ multipleSelection }}
      </el-form-item>
      <el-form-item label="消息等级">
        <el-select v-model="form.region">
          <el-option label="通知消息" value="1" />
          <el-option label="提示消息" value="2" />
          <el-option label="重要消息" value="3" />
          <el-option label="紧急消息" value="4" />
        </el-select>
      </el-form-item>
      <el-form-item label="通知内容">
        <el-input v-model="form.desc" type="textarea" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">取消</el-button>
        <el-button>发送通知</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup lang="ts">
import { reactive } from "vue";
defineProps(["multipleSelection"]);
// do not use same name with ref
const form = reactive({
  name: "",
  region: "1",
  desc: "",
});

const onSubmit = () => {
  console.log("submit!");
};
</script>

<style scoped></style>
